#pragma once
# include "TextureDrawAble.h"

class VertexScalBufferBindAble;

class CursorTextureDrawAble : public TextureDrawAble {
public:
	CursorTextureDrawAble(MyDx11* _myDx11, int _width, int _height, float _base_x, float _base_y);
	void draw(MyDx11* _myDx11);
	~CursorTextureDrawAble() override;
private:
	void drawCursor(MyDx11* _myDx11);

	bool copyFromColor(MyDx11* _myDx11, ICONINFO& _icon_info, BITMAP& _bmp);
	bool copyFromMask(MyDx11* _myDx11, ICONINFO& _icon_info, BITMAP& _bmp);
	uint8_t bitToAlpha(uint8_t* data, long pixel);

	float m_base_x = 0.0f;
	float m_base_y = 0.0f;
	VertexScalBufferBindAble* m_vertex_scal_buffer = nullptr;
	HCURSOR m_cache_cursor = nullptr;
	DWORD m_x_hotsopt = 0;
	DWORD m_y_hotsopt = 0;
};
